package cn.gok.entity;

/**
 * @Description:
 * @Author: chen fan
 * @Date: 2022年11月02日 10:57:53
 */

public class User {
    private String userName;
    private String age;
    private String address;


    public User(){
        System.out.println("user对象被创建。。。。");
        this.userName = "zhangsan";
        this.age = "18";
        this.address = "成都";
    }

    public void init(){
        System.out.println("执行init方法进行初始化操作。。。");
    }

    public void destroy(){
        System.out.println("执行destroy方法进行销毁操作。。。");
    }


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        System.out.println("调用setUserName 对UserName赋值");
        this.userName = userName;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "userName='" + userName + '\'' +
                ", age='" + age + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
